package servlet.admin;

import service.AdoptService;
import service.Impl.AdoptServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet( urlPatterns = "/admin/agreeList")
public class AgreeListServlet extends HttpServlet {
    private AdoptService adoptService = new AdoptServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("UTF-8");
        req.setAttribute("agreeList",adoptService.findAgreeAll());
        req.getRequestDispatcher("/admin/agree.jsp").forward(req,resp);
    }
}
